package com.trolls.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.IsSerializable;

public class Race extends Item implements IsSerializable  {
	public Race() {
	}
	public Race(int id){
		super(id);
		}

	public Race(int id, String name, String description,
			String competenceSpeciale, String competenceSpecialeSecondaire,
			String image) {
		super(id, name, description, image);
		this.competenceSpeciale = competenceSpeciale;
		this.competenceSpecialeSecondaire = competenceSpecialeSecondaire;
	}
	
	private String competenceSpeciale;
	private String competenceSpecialeSecondaire;

	//Getters and Setters

	public String getCompetenceSpeciale() {
		return competenceSpeciale;
	}
	public void setCompetenceSpeciale(String competenceSpeciale) {
		this.competenceSpeciale = competenceSpeciale;
	}
	
	public String getCompetenceSpecialeSecondaire() {
		return competenceSpecialeSecondaire;
	}
	public void setCompetenceSpecialeSecondaire(
			String competenceSpecialeSecondaire) {
		this.competenceSpecialeSecondaire = competenceSpecialeSecondaire;
	}
	
	@Override
	public String toString() {
		return super.toString()+", Race [competenceSpeciale=" + competenceSpeciale
				+ ", competenceSpecialeSecondaire="
				+ competenceSpecialeSecondaire + "]";
	}
	
	public String getImagePath() {
		return GWT.getHostPageBaseURL()
				+ "images/Race/" +image;
	}
	public void afficher( Content c){
		c.showRace((Race)this);
	}


}
